var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/wechat');

var db = mongoose.connection;
db.on('error', console.error.bind(console, 'connection error:'));
db.once('open', function (callback) {
  // yay!
});

var Users = mongoose.Schema({
    openid:String,
    nickname:String,
    sex	:Number,
    province:String,
    city:String,
    country:String,
    headimgurl:String,
    privilege:Array,
    unionid:String
     
    
})
module.exports = mongoose.model('Users', Users)
   